package com.github.admin.edu.security.jwt.server.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Objects;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-7-24
 */
@Entity
public class Tuser implements Serializable {
    private Long id;
    private String certno;
    private Long chgpwdlimit;
    private Long grade;
    private String iplimit;
    private Boolean locked;
    private String logincode;
    private Long logins;
    private String name;
    private Long orgid;
    private String password;
    private Long status;
    private Integer userattribute;
    private String userid;
    private Long yhsf;

    @Id
    @Column(name = "ID")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "CERTNO")
    public String getCertno() {
        return certno;
    }

    public void setCertno(String certno) {
        this.certno = certno;
    }

    @Basic
    @Column(name = "CHGPWDLIMIT")
    public Long getChgpwdlimit() {
        return chgpwdlimit;
    }

    public void setChgpwdlimit(Long chgpwdlimit) {
        this.chgpwdlimit = chgpwdlimit;
    }

    @Basic
    @Column(name = "GRADE")
    public Long getGrade() {
        return grade;
    }

    public void setGrade(Long grade) {
        this.grade = grade;
    }

    @Basic
    @Column(name = "IPLIMIT")
    public String getIplimit() {
        return iplimit;
    }

    public void setIplimit(String iplimit) {
        this.iplimit = iplimit;
    }


    @Basic
    @Column(name = "LOCKED")
    public Boolean getLocked() {
        return locked;
    }

    public void setLocked(Boolean locked) {
        this.locked = locked;
    }

    @Basic
    @Column(name = "LOGINCODE")
    public String getLogincode() {
        return logincode;
    }

    public void setLogincode(String logincode) {
        this.logincode = logincode;
    }

    @Basic
    @Column(name = "LOGINS")
    public Long getLogins() {
        return logins;
    }

    public void setLogins(Long logins) {
        this.logins = logins;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "ORGID")
    public Long getOrgid() {
        return orgid;
    }

    public void setOrgid(Long orgid) {
        this.orgid = orgid;
    }

    @Basic
    @Column(name = "PASSWORD")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @Column(name = "STATUS")
    public Long getStatus() {
        return status;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    @Basic
    @Column(name = "USERATTRIBUTE")
    public Integer getUserattribute() {
        return userattribute;
    }

    public void setUserattribute(Integer userattribute) {
        this.userattribute = userattribute;
    }

    @Basic
    @Column(name = "USERID")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "YHSF")
    public Long getYhsf() {
        return yhsf;
    }

    public void setYhsf(Long yhsf) {
        this.yhsf = yhsf;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Tuser tuser = (Tuser) o;
        return Objects.equals(id, tuser.id) &&
                Objects.equals(certno, tuser.certno) &&
                Objects.equals(chgpwdlimit, tuser.chgpwdlimit) &&
                Objects.equals(grade, tuser.grade) &&
                Objects.equals(iplimit, tuser.iplimit) &&
                Objects.equals(locked, tuser.locked) &&
                Objects.equals(logincode, tuser.logincode) &&
                Objects.equals(logins, tuser.logins) &&
                Objects.equals(name, tuser.name) &&
                Objects.equals(orgid, tuser.orgid) &&
                Objects.equals(password, tuser.password) &&
                Objects.equals(status, tuser.status) &&
                Objects.equals(userattribute, tuser.userattribute) &&
                Objects.equals(userid, tuser.userid) &&
                Objects.equals(yhsf, tuser.yhsf);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, certno, chgpwdlimit, grade, iplimit, locked, logincode, logins, name, orgid, password, status, userattribute, userid, yhsf);
    }
}
